import axios from "@/libs/api.request"
let baseUrl = "http://192.168.1.68:18081"

/**
 *  {name} 销售列表
 *  {params} 
 *  {methods} get
 * 
*/
export const getActivityList = (data) => {
    return axios.request({
        url: baseUrl + "/shangchao/carousel/get_page",
        params: data,
        method: "get"
    });
}


/**
 *  {name} 上下架营销活动
 *  {params} 
 *  {methods} put
 * 
*/
export const upOrDownActivity = (data) => {
    return axios.request({
        url: baseUrl + "/shangchao/carousel",
        data: data,
        method: "put"
    });
}


/**
 *  {name} 删除营销活动
 *  {params} 
 *  {methods} delete
 * 
*/
export const delActivity = (data) => {
    return axios.request({
        url: baseUrl + "/shangchao/carousel",
        params: data,
        method: "delete"
    });
}


/**
 *  {name} 新增或者修改营销活动
 *  {params} 
 *  {methods} post
 * 
*/
export const addActivity = (data) => {
    return axios.request({
        url: baseUrl + "/shangchao/carousel",
        data: data,
        method: "post"
    });
}


export const editActivity = (data) => {
    return axios.request({
        url: baseUrl + "/shangchao/carousel",
        data: data,
        method: "put"
    });
}



